package com.wodsy.phoenix.dataobject.goodsc.model.search;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;

import com.wodsy.phoenix.dataobject.base.PhoenixObject;
import com.wodsy.phoenix.dataobject.base.PhoenixRequest;
import com.wodsy.phoenix.dataobject.base.PhoenixResponse;

/**
 * TbGoodsSaleProperty entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tb_goods_sale_property", catalog = "goodsc")
@Indexed(index="GoodsSaleProperty")
public class GoodsSaleProperty extends PhoenixObject implements java.io.Serializable,PhoenixRequest,PhoenixResponse {

	// Fields

	private static final long serialVersionUID = 1L;
	
	private Integer id;
	@Field(name="popularity",index=Index.NO,store=Store.YES)
	private Integer popularity;      //人气
	@Field(name="sales",index=Index.NO,store=Store.YES)
	private Integer sales;           //销售量
	@Field(name="views",index=Index.NO,store=Store.YES)
	private Integer views;  // 浏览量

	
	// Constructors

	/** default constructor */
	public GoodsSaleProperty() {
	}

	/** full constructor */
	public GoodsSaleProperty(Integer popularity, Integer sales,Integer views) {
		this.popularity = popularity;
		this.sales = sales;
		this.views = views;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "popularity")
	public Integer getPopularity() {
		return this.popularity;
	}

	public void setPopularity(Integer popularity) {
		this.popularity = popularity;
	}

	@Column(name = "sales")
	public Integer getSales() {
		return this.sales;
	}

	public void setSales(Integer sales) {
		this.sales = sales;
	}
	
	@Column(name = "views")
	public Integer getViews() {
		return views;
	}

	public void setViews(Integer views) {
		this.views = views;
	}

	
}